<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <!-- 浏览器默认设置字体为16px -->
  <style>
    /* 字体设置方式一：px */
    .home {
      font-size: 20px;
    }
  .box {
    /* font-size: 2em; */
    /* 了解=>父元素的字体尺寸 */
    font-size: 200%;
  }
  .box1 {
    /* 字体设置方式二：em */
    /* 2个em事 */
    font-size: 2em;
    /* 了解： */
  }
  
  </style>
</head>
<body>

  <div class="home">
    <div class="box">我是div元素</div>
  </div>
  <div class="box1">我是div元素</div>
</body>
</html>